
$( "#btnNext" ).click(function() {
  get_events_by_type($("#eventTypeId").val(), 'AC');
});

$( "#btnProgres" ).click(function() {
  get_events_by_type($("#eventTypeId").val(), 'IP');
});

$( "#btnLast" ).click(function() {
  get_events_by_type($("#eventTypeId").val(), 'FI');
});

$( "#btnCancel" ).click(function() {
  get_events_by_type($("#eventTypeId").val(), 'CA');
});

$( "#btnRepo" ).click(function() {
  $("#eventType_seleted").val($("#eventTypeId").val());
  get_repositorie($("#categorieCode").val());
});

function get_events_by_type(eventTypeId, status) {
    $.ajax({
            dataType: "html",
            type: "POST",
            evalScripts: true,
            url: '../Events/get_events_by_type/' + eventTypeId + '/' + status,
            data: null,
            success: function (data, textStatus){
                $("#content_result_by_status").html(data);
            }
        });
}

function get_repositorie(code) {
    switch(code)
    {
        //Repositorio de datos de futbol
        case "FT":
            $.ajax({
                dataType: "html",
                type: "POST",
                evalScripts: true,
                url: '../Events/get_futbol_data_repositorie',
                data: null,
                success: function (data, textStatus){
                    $("#content_result_by_status").html(data);
                }
            });
            break;
        case "FN":
            //Aca tenes que meter la busqueda a tu repo para finanzas
            break;
    }
}